package com.hs.srm.admin.modules.harmfulsubstance.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.hs.srm.base.common.base.CloneableEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.Date;

/**
 * (SvhcItemEntity)高度关注物质清单 item实体类
 *
 * @author ych
 * @since 2020-03-12 09:11:25
 */

@Setter
@Getter
@ToString
@TableName("svhc_item")
public class SvhcItemEntity implements Serializable, CloneableEntity<SvhcItemEntity> {
    private static final long serialVersionUID = 682619886991326732L;

    // 无效
    public static final int SHANCHU= 1;

    /**
     * id
     */
    @TableId(value = "pk_id", type = IdType.UUID)
    @TableField("pk_id")
    private String pkId;

    /**
     * 表头id，行项目关联svhc_head
     */
    @TableField("head_id")
    private String headId;

    /**
     * 高度关注物质
     */
    @TableField("svhc")
    private String svhc;

    /**
     * 中文名称
     */
    @TableField("zh_name")
    private String zhName;

    /**
     * 英文名称
     */
    @TableField("en_name")
    private String enName;

    /**
     * 化学文摘号
     */
    @TableField("cas_no")
    private String casNo;

    /**
     * 创建时间
     */
    @TableField("create_date")
    @JSONField(format = "yyyy-MM-dd")
    private Date createDate;

    /**
     * 创建人
     */
    @TableField("creator")
    private String creator;

    /**
     * 删除标记：1，删除；0，未删除
     */
    @TableField("delete_flag")
    private Integer deleteFlag;

    /**
     * 删除者
     */
    @TableField("delete_person")
    private String deletePerson;

    /**
     * 删除时间
     */
    @TableField("delete_date")
    @JSONField(format = "yyyy-MM-dd")
    private Date deleteDate;

    @Override
    public SvhcItemEntity clone() {
        try {
            return (SvhcItemEntity)super.clone();
        } catch(CloneNotSupportedException ex) {
            ex.printStackTrace();
        }
        return null;
    }
}